<div id="primary">
	<h1>Public Queriac Commandline</h1>
	<div class="description_box">
		<% form_tag user_command_execute_path(User::PUBLIC_USER, 'search_form'), :method=>:get  do %>
			<%= link_to_function 'Some Tips', "$('commandline_tips').toggle()", :class=>'function_link',:style=>"font-size: 10px; color:#427F0B" %>
			<%= text_field_tag 'search_command',nil, :size=>30 %>
			<%= submit_tag 'GO' %>
		<% end %>
		<div id="commandline_tips" style="padding-left: 20px; padding-top: 10px; display:none">
			<ul class="normal" style="list-style-type: square">
			<li>
				Commands are given in the form [command] [options] [arguments].<br/>
				For example, if you want to search google news for facts, <br/>
				try <%= link_to_function "g -type news facts", "$('search_command').value = 'g -type news facts'", :class=>'function_link' %> 
				or in its aliased form
				<%= link_to_function "g -t n facts", "$('search_command').value = 'g -t n facts'", :class=>'function_link' %>.
			</li>
			<li>
				 You can get help for any command by appending a -h or -help option to it ie 
				<%= link_to_function "g -h", "$('search_command').value = 'g -h'", :class=>'function_link' %>.<br/>
			</li>
			<li>
				Any public command created by our users can be used from here within 24 hours of its creation. Check out 
				<%= link_to "our repository of commands", commands_path %>.
			</li>
			<li>
				Bookmarklets cannot be executed from here. You can still try them anonymously by <%=link_to 'setting up your browser',
				static_page_path('setup')%> to point to <%= link_to 'our public user', user_home_path(User::PUBLIC_USER) %> and then
				installing <%= link_to "our bookmarklet enabler", static_page_path('tutorial') + '#bookmarklets'%>.
			</li>
			</ul>
			
		</div>
	</div>
	<h1><%= link_to "Latest User Commands", user_commands_path, :title=>"Commands that users have subscribe to." %></h1>
	<%= user_command_table @latest_user_commands, :columns=>[:name, :user, :created_at]%>
	
	<h1><%= link_to "Latest Revised Commands", commands_path(:sort=>'down_by_revised_at'), :title=>"Commands that have had their functionality revised." %></h1>
	<%= command_table @latest_revised_commands, :columns=>[:name, :user, :revised_at] %>
	
	<h1><%= link_to "Latest Commands", commands_path, :title=>"Commands that have just been created." %></h1>
	<%= command_table @latest_commands, :columns=>[:name, :user, :created_at] %>
</div>

<div id="secondary">
	
	<h1>Manifesto</h1>
	<%= 
	manifesto = %[
		<p class="justified">
			Queriac allows you to manage your quicksearches, shortcuts, and bookmarklets 
			by taking them out of your browser profile and onto the web, making them portable, 
			taggable, shareable, and generally easier to manage. Drawing from the concept of 
			#{nofollow_link_to("Yubnub", "http://yubnub.org")} and extending it in the spirit of 
			#{nofollow_link_to("del.icio.us", "http://del.icio.us")}, Queriac effectively turns 
			your browser's address bar into a flexible command line.
		</p>
	
		<p>To start using Queriac, #{link_to("create an account", new_user_path)}. It's easy, free, and awesome.</p>
	]
	#careful where this truncates, since it could cut a tag
	truncate_with_more(manifesto, 65)
	%>
	
	<h1 style="margin-top: 0px">New Features</h1>
	
	<ul class="normal" style="list-style-type: square">
		<li>
			Allowing others to anonymously query your commands is a separate option per command. [10/10]
		</li>
		<li>
			The header now has two actions: search commands and public command.
			'search commands' simply searches our list of commands. 'public command' executes any public command through
			<%= link_to "the public user", user_home_path(User::PUBLIC_USER) %>. This is especially handy if you want to try out a
			command before subscribing to it. Note that bookmarklet	commands can't be executed from here. [10/8]
		</li>
		<span id="more_features" style="display:none">
			<li>
				We have our first page dedicated to <%= link_to("Tags", tags_path) %>! For now it has
				commands we recommend through our tag lists and some interesting tag clouds. [10/3]
			</li>
			<li>
				We now have a <%= link_to "public user", user_home_path(User::PUBLIC_USER) %> whose sole responsibility is to automatically
				subscribe to and offer access to all <%= link_to "our public commands", commands_path %>. [9/28]
			</li>
		</span>
		<%= link_to_function "See More/Less Features ...", "$('more_features').toggle()", :class=>'function_link' %>
		<%= link_to "See All Features", static_page_path('features'), :style=>'padding-left: 10px'%>
	</ul>
	
	<h1>Latest Public Queries</h1>
	
	<%= query_table @queries, :columns=>[:command_icon, :user, :query_string], :headers=>["&nbsp;", "User", "Query"]%>
	<%= table_link_to "View all queries", queries_path %>
	
	<h1>Updates &amp; Support</h1>

	<h2>Google Group</h2>
	<p>If you need support or want to make a feature request, head over to <%= nofollow_link_to "Queriac's Google Group", "http://groups.google.com/group/queriac" %>.</p>

	<h2>Blog<%= feed_icon_tag('Queriac Blog', 'http://queriac.tumblr.com/rss') %></h2>
	<p>Queriac has a cute little tumblelog at <%= nofollow_link_to "queriac.tumblr.com", "http://queriac.tumblr.com" %> . If you're looking 
		to stay in the loop about what's going on with Queriac but don't want to be overwhelmed by the chatter, this is the feed for you.</p>
	
	<h2>Bugs</h2>
	<p>Queri.ac is a one-man project at the moment so it's got its share of minor issues. If you find something, please submit a ticket at <%= nofollow_link_to "Queriac's Google Code Project Page", "http://code.google.com/p/monoquery/issues/list" %>.</p>
	
	
	<%= render :partial => "users/user_list"  %>

</div>